package com.info.zhiduoduo.repository.entity.company;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author bob
 * @since 2019-01-25
 */
@Data
@Accessors(chain = true)
@TableName("zdd_company_recharge")
public class CompanyRecharge extends Model<CompanyRecharge> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "rechargeid", type = IdType.AUTO)
    private Integer rechargeid;
    /**
     * 充值流水单号
     */
    private String rechargeno;
    /**
     * 企业id
     */
    private Integer compid;
    /**
     * 充值金额
     */
    private BigDecimal amount;
    /**
     * 电子回单单号
     */
    private String receiptno;
    /**
     * 电子回单url
     */
    private String receiptimg;
    /**
     * 充值状态 1:申请中 2:确认中 3:已完成
     */
    private Integer state;
    /**
     * 红充时的备注
     */
    private String remark;
    /**
     * 充值时间
     */
    private Date rechargetime;
    private Date createtime;
    /**
     * 主体ID
     */
    @TableField("subject_id")
    private Integer subjectId;
    /**
     * 主体编码
     */
    @TableField("subject_code")
    private String subjectCode;

    /**
     *
     * 创建人员id
     **/
    @TableField("create_adminid")
    private Integer createAdminid;

    /**
     *
     *修改人员id
     **/

    @TableField("update_adminid")
    private Integer updateAdminid;

    /**
     * 记录防止表zdd_company_payment对应的payId变化
     */
    @ApiModelProperty("支付方式id(表zdd_payment)")
    @TableField("pay_id")
    private Integer payId;

    @Override
    protected Serializable pkVal() {
        return this.rechargeid;
    }

}
